import 'package:json_annotation/json_annotation.dart';

part 'address_model.g.dart';


@JsonSerializable()
class AddressModel extends Object {

  List<AddressItemModel> filter_result;

  Filter filter;

  int total;

  int errcode;

  String message;

  AddressModel(this.filter_result,this.filter,this.total,this.errcode,this.message,);

  factory AddressModel.fromJson(Map<String, dynamic> srcJson) => _$AddressModelFromJson(srcJson);

  Map<String, dynamic> toJson() => _$AddressModelToJson(this);

}


@JsonSerializable()
class AddressItemModel extends Object {

  String region_name;

  int address_id;

  int user_id;

  String consignee;

  String email;

  List<String> region_names;

  String address;

  String telephone;

  String mobile;

  int is_selected;

  int is_default;

  AddressItemModel(this.region_name,this.address_id,this.user_id,this.consignee,this.email,this.region_names,this.address,this.telephone,this.mobile,this.is_selected,this.is_default,);

  factory AddressItemModel.fromJson(Map<String, dynamic> srcJson) => _$AddressItemModelFromJson(srcJson);

  Map<String, dynamic> toJson() => _$AddressItemModelToJson(this);

}


@JsonSerializable()
class Filter extends Object {

  String page;

  int size;

  Filter(this.page,this.size,);

  factory Filter.fromJson(Map<String, dynamic> srcJson) => _$FilterFromJson(srcJson);

  Map<String, dynamic> toJson() => _$FilterToJson(this);

}


